import { ROUTERS_ENUMS } from '@/constant/system';
import { RouterView } from 'vue-router';

export default [
  {
    path: 'indicator',
    name: `${ROUTERS_ENUMS.SYSTEM}Indicator`,
    component: () => import("@/views/system/article/components/Indicator.vue"),
    // meta: { title: '文章列表' },
  },
  {
    path: 'article',
    name: `${ROUTERS_ENUMS.SYSTEM}Article`,
    // component: () => import("@/views/system/article/index.vue"),
    // component: <RouterView />,
    meta: { title: '文章管理' },
    redirect: { name: `${ROUTERS_ENUMS.SYSTEM}ArticleList` },
    children: [
      {
        path: 'list',
        name: `${ROUTERS_ENUMS.SYSTEM}ArticleList`,
        component: () => import("@/views/system/article/index.vue"),
        meta: { 
          title: '文章列表',
          activeMenu: '/system/article',
          // activeMenu: `${ROUTERS_ENUMS.SYSTEM}Article`
        },
      },
      {
        path: 'create',
        name: `${ROUTERS_ENUMS.SYSTEM}ArticleCreate`,
        component: () => import("@/views/system/article/components/Form.vue"),
        meta: { 
          title: '文章创建',
          activeMenu: '/system/article',
          // activeMenu: `${ROUTERS_ENUMS.SYSTEM}Article`
        },
      },
      {
        path: 'edit/:id',
        name: `${ROUTERS_ENUMS.SYSTEM}ArticleEdit`,
        component: () => import("@/views/system/article/components/Form.vue"),
        meta: { 
          title: '文章编辑',
          activeMenu: '/system/article',
          // activeMenu: `${ROUTERS_ENUMS.SYSTEM}Article`
        },
      },
      {
        path: 'detail/:id',
        name: `${ROUTERS_ENUMS.SYSTEM}ArticleDetail`,
        component: () => import("@/views/system/article/components/Detail.vue"),
        meta: { 
          title: '文章详情',
          activeMenu: '/system/article',
          // activeMenu: `${ROUTERS_ENUMS.SYSTEM}Article`
        },
      },
    ]
  },

];
